package com.qijian.business.domain.query;

import com.baomidou.mybatisplus.annotation.TableName;
import com.qijian.common.utils.mybatis.WhereType;
import com.qijian.common.utils.mybatis.WhereTypeEnum;
import lombok.Data;
import lombok.ToString;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Set;


/**
 * 报价单对象 查询条件类
 *
 * @author qijian
 * @date 2021-10-09
 */

@Data
@ToString
@TableName("sm_quotation")
public class QuotationSimpleQuery {

    @WhereType(filed = "id")
    private Long id;
    @WhereType(filed = "id", type = WhereTypeEnum.IN)
    private Set<Long> ids;
    @WhereType(filed = "number")
    private String number;
    @WhereType(filed = "operation_type", type = WhereTypeEnum.LIKE)
    private String operationType;
    @WhereType(filed = "item_id")
    private String itemId;
    @WhereType(filed = "item_type", type = WhereTypeEnum.LIKE)
    private String itemType;
    @WhereType(filed = "item_name", type = WhereTypeEnum.LIKE)
    private String itemName;
    @WhereType(filed = "quantity")
    private BigDecimal quantity;
    @WhereType(filed = "price")
    private BigDecimal price;
    @WhereType(filed = "trade_mode", type = WhereTypeEnum.LIKE)
    private String tradeMode;
    @WhereType(filed = "big_or_small", type = WhereTypeEnum.LIKE)
    private String bigOrSmall;
    @WhereType(filed = "customer_id", type = WhereTypeEnum.EQ)
    private Long customerId;
    @WhereType(filed = "customer_name", type = WhereTypeEnum.LIKE)
    private String customerName;
    @WhereType(filed = "end_time", type = WhereTypeEnum.BETWEEN)
    private Date[] endTime;
    @WhereType(filed = "lead_time")
    private BigDecimal leadTime;
    @WhereType(filed = "prod_cycle")
    private BigDecimal prodCycle;
    @WhereType(filed = "ship_inspection_fee")
    private BigDecimal shipInspectionFee;
    @WhereType(filed = "cert_fee")
    private BigDecimal certFee;
    @WhereType(filed = "other_inspection_fee")
    private BigDecimal otherInspectionFee;
    @WhereType(filed = "trade_terms", type = WhereTypeEnum.LIKE)
    private String tradeTerms;
    @WhereType(filed = "store_address", type = WhereTypeEnum.LIKE)
    private String storeAddress;
    @WhereType(filed = "remark", type = WhereTypeEnum.LIKE)
    private String remark;
    @WhereType(filed = "status")
    private String status;
    @WhereType(filed = "approval_by", type = WhereTypeEnum.LIKE)
    private String approvalBy;
    @WhereType(filed = "approval_time", type = WhereTypeEnum.BETWEEN)
    private Date[] approvalTime;
    @WhereType(filed = "approval_status")
    private String approvalStatus;
    @WhereType(filed = "create_id")
    private Long createId;
    @WhereType(filed = "create_by", type = WhereTypeEnum.LIKE)
    private String createBy;

    @WhereType(func = "DATE_FORMAT(sm_quotation.create_time,'%Y') = {1}")
    private String year;

    @WhereType(ignore = true)
    private int type;

    //    @WhereType(filed = "create_time",type = WhereTypeEnum.BETWEEN,dateFormatPattern = "%Y-%m")
    @WhereType(ignore = true)
    private List<String> monthDuration;

    @WhereType(filed = "status", tableName = "sm_quotation_project", type = WhereTypeEnum.EQ)
    private String projectStatus;
}
